a = 0  # 初始化变量a
b = 0  # 初始化变量b

a += b
print("a=%d,b=%d" % (a, b))

# 添加异常处理避免0的负数次幂错误
try:
    a **= b
    print("a=%d,b=%d" % (a, b))
except ZeroDivisionError:
    print("错误：0不能进行负数次幂运算")

print(17**5)

x, y, z = 1, 2, 3
x = (y == z + 1)

print(abs(-20), abs(100))
print(divmod(12, 5))
print(pow(2, 8))
print(round(99.556, 1))
print(max("1234567890"))
print(max(323, 99, 66, 18, 19))
print(min(323, 99, 66, 18, 19))

print("(2**4+7-3*4)/5=%f"%((2**4+7-3*4)/5))
print(f"divmod(2**4+7-3*4,5)={divmod(2**4+7-3*4,5)}")

# 添加除法运算的异常处理
try:
    print("(1+3**2)*(16%%7)/7=%f" % ((1+3**2)*(16%7)/7))
except ZeroDivisionError:
    print("错误：除数不能为零")
